package Others.DesignPattern.ObserverPattern.Pattern.Object;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;


@EqualsAndHashCode(callSuper = true)
@Data
public class ColleagueA extends Observer{

    public ColleagueA(String name, Secretary secretary){
        this.name = name;
        this.sub = secretary;
    }

    @Override
    public void update() {
        System.out.println(sub.getMessage() + name + " 关闭股票，继续工作！");
    }


}
